home *** CD-ROM | disk | FTP | other *** search
- Path: news.iwl.net!usenet
- From: "Gary L. Grobe" <glgrobe@iwl.net>
- Newsgroups: comp.lang.c++
- Subject: help with defining classes
- Date: Sun, 07 Apr 1996 01:11:09 -0600
- Organization: A poorly-installed InterNetNews site
- Message-ID: <31676A8D.1F95@iwl.net>
- NNTP-Posting-Host: p194.iwl.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- I need a doubly linked list of pointers (refer to this as the parent
- list). Each pointer points to an object (refer to this as the node).
- Each node is to contain several other doubly linked list of objects
- (child list). I planned on making the parent list and child list using
- TIDoubleListImp but learned that I cannot use templates inside
- templates. Each elem of the child list is to be dynamically allocated.
-
- Maybe I should not even be using a container class. I could define *next
- and *prev in each class and use member functions for list management but
- this is too textbook like and I would like to take advantage of and
- learn the more advanced features.
-
- Can someone map an example class.
- Also, if using container classes, how do I declare this globally
- through out many files. I tried declaring a container as external in a
- main header and put it in a global.cpp file. I don't think I had the
- syntax right.
-
- [][][][][][][] parent double link list
- ^ pointer to node object
- [] node object
- /|\
- / | \
- / | \
- / | \
- [][] [][] [][][][]
- list list list
- objA objB objC
-
- objA, objB and objC have very little in common.
-
- Any help is much appreciated!!!
-